package com.wenyang.controller;


import com.wenyang.entity.TabUser;
import com.wenyang.service.LoginService;
import com.wenyang.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/")
@Api(value = "系统登录",tags = {"系统登录"})
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    @ApiOperation("登录")
    public R login(@RequestParam String password,@RequestParam String username){
        return loginService.findByName(username,password);
    }

}
